package com.varton.strategy;

import java.util.List;
import java.util.Map;

/**
 *
 * @author lihuazeng
 */
public class AliasContext {
    private List<IAlias> pool;

    public AliasContext(List<IAlias> pool) {
        this.pool = pool;
    }

    public String getAlias(Map<String, Object> reqMap){
        for (IAlias alias : pool){
            String a = alias.alias(reqMap);
            if (a != null){
                return a;
            }
        }
        return null;
    }
}